package com.sort;

import java.util.Comparator;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.model.xmlElement.DataColumnOutput;
/**
 * *********************************************
 * @author Administrator
 * @FileName DataColumnOutputSort.java
 * @Description文件输出列排序
 **********************************************
 */
public class DataColumnOutputSort implements Comparator<DataColumnOutput>{
	public static final Logger LOG = LoggerFactory.getLogger(DataColumnOutputSort.class);

	@Override
	public int compare(DataColumnOutput dataColumnOutput1, DataColumnOutput dataColumnOutput2) {
		int index1 = Integer.valueOf(dataColumnOutput1.getOutputIndex());
		int index2 = Integer.valueOf(dataColumnOutput2.getOutputIndex());
		if(index1 > index2){
			return 1;
		}
		return -1;
	}

}
